import { getConsultPreAPI } from '@/apis/consult'
import { showImagePreview, showToast } from 'vant'
// 查看处方
export const useShowPre = () => {
  const showPre = async (id?: string) => {
    // console.log(id)
    if (id) {
      const res = await getConsultPreAPI(id)
      showImagePreview([res.data.url])
    } else {
      showToast('暂无处方')
    }
  }
  return {
    showPre
  }
}
